#include "stdafx.h"
#include "gpu.h"
#include "PixelCalc.h"

int main() {

#ifdef DEBUG_H_main
	PixelStorage pS;
	PixelCalcBase pCB(pS);
	PixelCalc pC;
	GPU gpuC(pS);
	clock_t t;

#ifdef TIME
	t = clock();

	pC.rasterOptimized(pS);
	cout << "Time: rasterization: "
	<< double(clock() - t) / double(CLOCKS_PER_SEC) << endl;

#else
	t = clock();

	gpuC.raster(pS);

	cout << "Time: rasterization: "
	<< double(clock() - t) / double(CLOCKS_PER_SEC) << endl;
#endif

#ifdef TIME
	t = clock();

	pCB.contours(pS);
	pC.calcTrueContours(pS);
	cout << "Time: contour finding/filtering: "
			<< double(clock() - t) / double(CLOCKS_PER_SEC) << endl;
#else
	t = clock();

	//gpuC.calcTrueContours(pS);

	cout << "Time: contour finding/filtering: "
	<< double(clock() - t) / double(CLOCKS_PER_SEC) << endl;
#endif

	pCB.loadImage(pS.contoursMatrix);
#endif
	waitKey(0);
	return 0;
}
